<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  	<%@ include file="/jspf/public.jspf" %>
  	<!-- 提交订单页面不需要缓存 -->
  	 <% response.setHeader("cache-control", "no-store");%>
  </head>
  
  <body>
  	<!-- 判断session中是否有购物项,如果没有则跳转到首页 -->
     <c:if test="${empty sessionScope.forder.sorderSet}">
     	 <c:redirect url="/index.jsp" />
     </c:if>
     <!-- 1：购物车相关信息, 2：填写订单配送信息  -->
            订单提交页面   <br />
     <table border="1">
      	   <tr>
      	   	<td>编号</td>
      	   	<td>名称</td>
      	   	<td>价格</td>
      	   	<td>数量</td>
      	   	<td>小计</td>
      	   </tr>
      	   <c:forEach items="${sessionScope.forder.sorderSet}" var="sorder">
      	   		 <tr>
		      	   	<td>${sorder.goods.id}</td>
		      	   	<td>${sorder.name}</td>
		      	   	<td>${sorder.price}</td>
		      	   	<td>${sorder.number}</td>
		      	   	<td>${sorder.price*sorder.number}</td>
		      	  </tr>
      	   </c:forEach>
      	   <tr>
      	   		<td colspan="5">
      	   		总价格为: ${forder.total}
      	   		</td>  
      	   </tr>
      </table>
      <hr />
              填写配送信息:<br />
     <form action="${shop}/forder_save$.action" method="post">
        	配送姓名:<input type="text" name="name" value="${sessionScope.user.name}" /><br /> 
        	手机号:<input type="text" name="phone" value="${sessionScope.user.phone}" /><br /> 
        	邮箱:<input type="text" name="email" value="${sessionScope.user.email}" /><br /> 
        	邮编:<input type="text" name="post" value="${sessionScope.user.post}" /><br /> 
        	配送地址:<input type="text" name="address" value="${sessionScope.user.address}" /><br /> 
        	<textarea rows="2" cols="50" name="remark"></textarea>
        	<input type="submit" value="提交订单" />
     </form>
  </body>
</html>
